<%@ Control Language="VB" AutoEventWireup="false" CodeFile="SearchWorkRecord.ascx.vb"
    Inherits="WebForm_ManageWorkRecord_SearchWorkRecord" %>
<%--<%@ Register Src="../CommonControl/VolunteerQueryControlV2.ascx" TagName="VolunteerQueryControl"
    TagPrefix="uc1" %>--%>
    <%@ Register Src="../CommonControl/VolunteerQueryControl.ascx" TagName="VolunteerQueryControl"
    TagPrefix="uc1" %>
<%@ Register Src="~/WebForm/CommonControl/AnnualControl.ascx" TagName="AnnualControl"
    TagPrefix="My" %>
    <%@ Register Src="~/WebForm/CommonControl/MonthDayControl.ascx" TagName="MonthDayControl"
    TagPrefix="My" %>
<%--<asp:UpdatePanel ID="up" runat="server">
    <ContentTemplate>--%>
        <table width="100%">
            <tr>
                <td class="Section" align="left">
                    <asp:Label ID="lblVolunteerQueryCondition" runat="server" meta:resourcekey="lblVolunteerQueryCondition"></asp:Label>
                </td>
            </tr>
        </table>
        <table>
   <%--         <tr>
                   <td>
                        <table>
                            <tr>
                              <td align="right">
                                 <asp:Label ID="lblOrganization" runat="server" meta:resourcekey="lblOrganization"></asp:Label>
                              </td>
                              <td align="left">
                                 <My:DropDown ID="ddlOrganization" runat="server" PopupControlID="pnlOrg" AutoPostBack="true"
                                 OnSelectedIndexChanged="ddlOrganization_SelectedIndexChanged"></My:DropDown>
                            </td>         
                              <asp:PlaceHolder ID="phVOrganizationID" runat="server" Visible="false">
                                 <td align="right">
                                    <asp:Label ID="lblVOrganizationID" runat="server" Text="<%$ Resources:VOrganizationID %>"></asp:Label>
                                 </td>
                                 <td align="left">  

                                <My:DropDown ID="ddlVOrganizationID" runat="server" PopupControlID="pnlVOrg"></My:DropDown>

                                 </td>
                            </asp:PlaceHolder>
                          </tr>
                       </table>
                    </td>
              </tr> --%>
            <tr>
                <td>
                    <uc1:VolunteerQueryControl ID="VolunteerQueryControl1" runat="server" />
                </td>
            </tr>
        </table>
        <table width="100%">
            <tr>
                <td class="Section" align="left">
                    <asp:Label ID="lblWorkInfo" runat="server" meta:resourcekey="lblWorkInfo"></asp:Label>
                </td>
            </tr>
        </table>
        <table width="100%">
            <tr>
                <td align="left">
                    <asp:Label ID="lblAnnual" runat="server" meta:resourcekey="lblAnnual"></asp:Label>
                </td>
                <td>
                    <My:CalendarTextBox ID="txtStartMonthDay" runat="server" /><asp:Label ID="lblPeriod" runat="server" meta:resourcekey="lblPeriod"></asp:Label>
                     <My:CalendarTextBox ID="txtEndMonthDay" runat="server" />
                    
          <%--          <asp:DropDownList ID="ddlYear" runat="server" AutoPostBack="true">
                    </asp:DropDownList><asp:Label ID="lblYear" runat="server" meta:resourcekey="lblYear"></asp:Label>
                   <My:MonthDayControl ID="txtStartMonthDay" runat="server" /><asp:Label ID="lblPeriod" runat="server" meta:resourcekey="lblPeriod"></asp:Label>
                  <My:MonthDayControl ID="txtEndMonthDay" runat="server" />--%>
                </td>
            </tr>
            <tr>
                <td align="left">
                    <asp:Label ID="lblWorkItem" runat="server" meta:resourcekey="lblWorkItem"></asp:Label>
                </td>
                <td>
        <%--            <asp:UpdatePanel ID="upWorkItem" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>--%>
                            <My:CodeMappingDropDownList ID="ddlWorkItem" runat="server" DataSourceID="odsWorkItem" AppendSelectAllItem="true"
                                AutoPostBack="true">
                            </My:CodeMappingDropDownList>
                            <My:CodeMappingSqlDataSource ID="odsWorkItem" runat="server" TableName="WorkHourRecord"
                                ColumnName="WorkType">
                            </My:CodeMappingSqlDataSource>
<%--                             <My:DropDown ID="ddlWorkItem" runat="server" AutoPostBack="true" PopupControlID="pnlWorkItem" OnSelectedIndexChanged="ddlWorkItem_SelectedIndexChanged"></My:DropDown>
--%>                            <asp:DropDownList ID="ddlPlanItemType" runat="server" visible="false"></asp:DropDownList>

                         
<%--                             <My:DropDown ID="ddlPlanItemType" runat="server" PopupControlID="pnlPlanItemType"  visible="false"></My:DropDown>
--%>
                            <%--<My:CodeMappingDropDownList ID="ddlPlanItemType" runat="server" DataSourceID="odsPlanItemType"
                                AppendSelectAllItem="true" Visible="false">
                            </My:CodeMappingDropDownList>
                            <My:CodeMappingSqlDataSource ID="odsPlanItemType" runat="server" TableName="CleanPlan"
                                ColumnName="ItemType">
                            </My:CodeMappingSqlDataSource>--%>
        <%--                </ContentTemplate>
                    </asp:UpdatePanel>--%>
                </td>        
                
            </tr>
            <tr>
                <td align="left">
                    <asp:Label ID="lblPlanName" runat="server" meta:resourcekey="lblPlanName"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlPlanName" runat="server">
                    </asp:DropDownList>
<%--                     <My:DropDown ID="ddlPlanName" runat="server" PopupControlID="pnlPleanName"></My:DropDown>
--%>
          <%--          <My:TableDataSource ID="odsPlanName" runat="server">
                        <SelectQuery>
                            <MyTable TableName="CleanPlan" AliasName="cp" />
                            <MyColumns>
                                <My:MyColumn ColumnList="cp.PlanID, PlanName = right('0'+CONVERT(varchar,Year(cp.StartDate)-1911),3) + '/' +  right('0'+CONVERT(varchar,Month(cp.StartDate)),2) + '/' +  right('0'+CONVERT(varchar,Day(cp.StartDate)),2) +' '+cp.PlanName" />
                            </MyColumns>
                            <Conditions>
                                <My:VariableCondition ColumnName="year(cp.StartDate)" VariableName="StartYear" />
                            </Conditions>
                            <MySortColumns>
                                <My:MySortColumn ColumnName="cp.StartDate" />
                            </MySortColumns>
                        </SelectQuery>
                        <SelectParameters>
                            <asp:ControlParameter ControlID="ddlYear" Name="StartYear" />
                        </SelectParameters>
                    </My:TableDataSource>  --%>          
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td valign="bottom">
                    <asp:Button ID="btnQuery" runat="server" Text="<%$ Resources:Query %>" />
                    <asp:Button ID="btnExport" runat="server" Text="<%$ Resources:Export %>" />
                    <asp:CheckBox ID="cbDetail" runat="server" Text="<%$ Resources:Detail %>" />
                </td>
            </tr>
        </table>
        <My:MyGridView ID="GridView1" runat="server" SkinID="pager" AllowHoverSelect="True"
            AllowHoverEffect="True" MySortDirection="Ascending" AutoGenerateColumns="False"
            meta:resourcekey="gv">
            <Columns>
<%--                <asp:TemplateField HeaderText="<%$ Resources:VOrganizationName %>" SortExpression="VOrganizationName">
                    <itemtemplate>
                        <%#Eval("VOrganizationName") %>
                    </itemtemplate>
                    <itemstyle horizontalalign="Center" />
                </asp:TemplateField>--%>
             <%--   <asp:BoundField DataField="VolunteerID" HeaderText="<%$ Resources:VolunteerID %>"
                    SortExpression="VolunteerID" />--%>
                <My:VolunteerIDBoundField DataField="VolunteerID" HeaderText="<%$ Resources:VolunteerID %>"
                    ReadOnly="True" SortExpression="VolunteerID" />
                <asp:BoundField DataField="VolunteerName" HeaderText="<%$ Resources:VolunteerName %>"
                    SortExpression="VolunteerName" />
                <asp:BoundField DataField="WorkTypeText" HeaderText="<%$ Resources:WorkTypeText %>"
                    SortExpression="WorkTypeText" />
                <asp:BoundField DataField="PlanName" HeaderText="<%$ Resources:PlanName %>" SortExpression="PlanName" />
                <asp:TemplateField HeaderText="<%$ Resources:WorkStartDate %>">
                    <itemtemplate>
                        <%#Eval("WorkStartDate") %>
                    </itemtemplate>
                    <itemstyle horizontalalign="Center" />
                </asp:TemplateField>
                <asp:BoundField DataField="WorkHour" HeaderText="<%$ Resources:WorkHour %>" SortExpression="WorkHour" />
            </Columns>
        </My:MyGridView>
<%--        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
            SelectMethod="BLL_Select" TypeName="BLL_ManageWorkRecord_SearchWorkRecord">
            <SelectParameters>
                <asp:Parameter Name="Region" Type="String" />
                <asp:Parameter Name="Region2" Type="String" />
                <asp:Parameter Name="VOrganizationID" Type="Int32" />
                <asp:Parameter Name="VolunteerId" Type="String" />
                <asp:Parameter Name="VolunteerName" Type="String" />
                <asp:Parameter Name="TEL" Type="String" />
                <asp:Parameter Name="Annual" Type="String" />
                <asp:ControlParameter ControlID="ddlWorkItem" Name="WorkItem" />
                <asp:ControlParameter ControlID="ddlPlanItemType" Name="PlanItemType" />
                <asp:ControlParameter ControlID="ddlPlanName" Name="PlanID" />
            </SelectParameters>
        </asp:ObjectDataSource>--%>
<%--      </ContentTemplate>
</asp:UpdatePanel>--%>